from sklearn2pmml import sklearn2pmml, make_pmml_pipeline
import pickle
import sys


if __name__ == '__main__':
    in_file = sys.argv[1]
    out_file = sys.argv[2]

    p = pickle.load(open(in_file, 'rb'))

    pipeline = make_pmml_pipeline(p, active_fields=['content'], target_fields=['label'])
    sklearn2pmml(pipeline, out_file, with_repr=True, debug=True)

